package com.example.demo.config;

import com.example.demo.listener.SecondListener;
import org.springframework.boot.web.servlet.ServletListenerRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @ClassName ListenerConfig
 * @Description ListenerConfig
 * @Author ZX
 * @Date 2020/5/26 10:12
 */
@Configuration
public class ListenerConfig {

    @Bean
    public ServletListenerRegistrationBean getServletListenerRegistrationBean(){
        ServletListenerRegistrationBean bean = new ServletListenerRegistrationBean(new SecondListener());
        return bean;

    }

}
